package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_Table(name = "c_card", simpleName = "", engine = MysqlDriver.InnoDB, comment = "开卡数据")
public class _DDL_CCard {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.INT_UNSIGNED, nullable = false, autoIncrement = true, comment = "id")
    private Long id;

    @_DDL_Unique(name = "UNI_C_CARD_CARD_NO")
    @_DDL_Column(name = "card_no", type = SqlType.VARCHAR, size = 16, comment = "卡面号码")
    private String cardNo;

    @_DDL_Index(name = "IDX_c_card_batch_no")
    @_DDL_Column(name = "batch_no", type = SqlType.VARCHAR, size = 20, comment = "批次号")
    private String batchNo;

    @_DDL_Column(name = "card_type", type = SqlType.VARCHAR, size = 3, comment = "卡前缀")
    private String cardType;

    @_DDL_Column(name = "state", type = SqlType.INT_UNSIGNED, comment = "状态码 0 数据新增  1 未启用 2 启用 3 锁定 4 销毁")
    private Long state;

    @_DDL_Column(name = "phy_no", type = SqlType.CHAR, size = 8, comment = "物理卡号")
    private String phyNo;

    @_DDL_Column(name = "ind_id", type = SqlType.VARCHAR, size = 4, comment = "行业id")
    private String indId;

    @_DDL_Column(name = "city_code", type = SqlType.CHAR, size = 4, comment = "城市代码")
    private String cityCode;

    @_DDL_Column(name = "app_version", type = SqlType.TINYINT_UNSIGNED, comment = "应用版本")
    private Integer appVersion;

    @_DDL_Column(name = "trans_id", type = SqlType.SMALLINT_UNSIGNED, comment = "互通id")
    private Integer transId;

    @_DDL_Index(name = "IDX_c_card_cr_date")
    @_DDL_Column(name = "cr_date", type = SqlType.INT_UNSIGNED, comment = "创建日期")
    private Long crDate;

    @_DDL_Column(name = "pub_date", type = SqlType.INT_UNSIGNED, comment = "发行日期")
    private Long pubDate;

    @_DDL_Index(name = "IDX_c_card_open_date")
    @_DDL_Column(name = "open_date", type = SqlType.INT_UNSIGNED, comment = "启用日期")
    private Long openDate;

    @_DDL_Column(name = "main_type", type = SqlType.TINYINT_UNSIGNED, comment = "卡主类型")
    private Integer mainType;

    @_DDL_Column(name = "sub_type", type = SqlType.TINYINT_UNSIGNED, comment = "卡子类型")
    private Integer subType;

    @_DDL_Column(name = "dev_id", type = SqlType.SMALLINT_UNSIGNED, comment = "发行设备id")
    private Integer devId;

    @_DDL_Column(name = "auth_key", type = SqlType.VARCHAR, size = 64, comment = "认证秘钥")
    private String authKey;

    @_DDL_Column(name = "route_key", type = SqlType.VARCHAR, size = 64, comment = "线路保护秘钥")
    private String routeKey;

    @_DDL_Column(name = "mac_key", type = SqlType.VARCHAR, size = 64, comment = "mac秘钥")
    private String macKey;

    @_DDL_Column(name = "mod_time", type = SqlType.TIMESTAMP, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP_ON_UPDATE, comment = "修改时间")
    private java.sql.Timestamp modTime;

    @_DDL_Column(name = "cr_time", type = SqlType.TIMESTAMP, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP, comment = "创建时间")
    private java.sql.Timestamp crTime;

}
